﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Biz_Dal.Biz;

public partial class Admin_Admin_QL_VOURCHER : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Dang_nhap"] != "1")
        {
            Response.Redirect("~/Trang_web/Trang_chu.aspx");
        }
    }
    protected void btnThem_Click(object sender, EventArgs e)
    {
        txtGiaTri.Text = null;
        txtMa.Text = null;
    }
    protected void btnLuu_Click(object sender, EventArgs e)
    {
        BizVourcher vourcher = new BizVourcher(-1, txtMa.Text, double.Parse(txtGiaTri.Text));
        BizVourcher.insertVourcher(vourcher);
        txtGiaTri.Text = null;
        txtMa.Text = null;
        GridViewVourcher.DataBind();
    }
}